package forum.client.ui;

import java.util.Observable;
import java.util.Observer;
import forum.client.ui.events.*;

public class SearchObserver implements Observer {
	
	private SearchHandler m_handler;
	
	/**
	 * 
	 * @param mHandler
	 */
	public SearchObserver(SearchHandler mHandler) {
		m_handler = mHandler;
	}

	/*
	 * (non-Javadoc)
	 * @see java.util.Observer#update(java.util.Observable, java.lang.Object)
	 */
	@Override
	public void update(Observable obs, Object o) {
		if (o != null && o instanceof SearchEvent) {
			((SearchEvent)o).respondToEvent(m_handler);
		}
	}

}
